﻿using Infrastructure.Model;
using Model;
using Repositories.IRepositories;
using Services.IServices;
using SqlSugar;
using SqlSugar.IOC;

namespace Services.Services
{

    [AppService(ServiceType = typeof(ITestServices), ServiceLifetime = LifeTime.Transient)]
    public class TestServices : ITestServices
    {
        private readonly ITestRepository _testRepository;
        private static readonly ISqlSugarClient Context;
        public TestServices(ITestRepository testRepository)
        {
            _testRepository = testRepository;
        }
        static TestServices()
        {
            Context = DbScoped.SugarScope;
        }
        public Test GetTest()
        {
            return _testRepository.GetTest();
        }
    }
}
